package com.gaussic.repository;

import com.gaussic.model.CommitteeEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
@Repository
public interface CommitteeRepository extends JpaRepository<CommitteeEntity, Integer> {

    // 修改博文操作
    @Modifying
    @Transactional
    @Query("update CommitteeEntity CMT set CMT.name=:qName where CMT.id=:qId")
    void updateBlog(@Param("qName") String name,@Param("qId") int id);
}
